MkImageSlideshow
Node to show an Image slideshow (in autoplay mode).¶
Example: Regular¶
Name | Children | Inherits |
---|---|---|
MkTemplate mknodes.templatenodes.mktemplate Node representing a jinja template. |
graph TD
93860743870752["mkimageslideshow.MkImageSlideshow"]
93860738888176["mktemplate.MkTemplate"]
93860744077920["mkcontainer.MkContainer"]
93860744073616["mknode.MkNode"]
93860744080896["node.Node"]
140589822947552["builtins.object"]
93860738888176 --> 93860743870752
93860744077920 --> 93860738888176
93860744073616 --> 93860744077920
93860744080896 --> 93860744073616
140589822947552 --> 93860744080896
/home/runner/work/mknodes/mknodes/mknodes/basenodes/mkimageslideshow/metadata.toml
[metadata]
icon = "mdi:image-multiple"
name = "MkImageSlideshow"
group = "image"
[[resources.js]]
link = "https://rawgit.com/ruyadorno/simple-slider/master/dist/simpleslider.min.js"
[[resources.js]]
filename = "slideshow.js"
content = """
window.addEventListener('DOMContentLoaded', function () {
simpleslider.getSlider();
})
"""
[[resources.css]]
filename = "https://unpkg.com/img-comparison-slider@7/dist/styles.css"
[examples.regular]
title = "Regular"
jinja = """
{{ ["https://picsum.photos/700", "https://picsum.photos/701"] | MkImageSlideshow }}
"""
[output.html]
template = """
<div style="width: 100%; padding-bottom: 25%" data-simple-slider="">
{% for image_url in node.images %}
<img src="{{ image_url }}">
{% endfor %}
</div>
"""